import './App.css';

import {connect} from "react-redux"
import {Routes,Route} from 'react-router-dom'
import routes from './router'
function App(props) {
  return (
   
      <Routes>
        {
          routes.map((e,i)=><Route path={e.path} element={e.element} key="i"></Route>)
        }
      </Routes>
   
  );
}
const mapStateToProps=(state)=>{
  return {
    'ci':state
  }
}
const mapDispatchToProps = (dispatch)=>{
return {
  "jia":(i)=>dispatch({type:"jia",n:i}),
  "jian":(i)=>dispatch({type:"jian",n:i})
}
}

export default  connect(mapStateToProps,mapDispatchToProps)(App);
